package org.ww.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.ww.bean.Person;

//通过@PropertySource注解将类路径下的配置文件注册到环境变量中，从环境变量中可以直接获取想要的数据
@PropertySource(value = {"classpath:/person.properties"})
@Configuration
public class MainConfigOfPropertyValue {

    @Bean
    public Person person(){
        return new Person();
    }
}
